package com.pi.pro.xcmg.am.was.fac.handler;

import com.pi.pro.xcmg.am.common.XcmgAmConstants;
import org.apache.commons.collections.map.HashedMap;

import java.util.Map;

/**
 *  
 */
public class WorkDataHolders {
    private static Map<Long, WorkDataHolder> workers = new HashedMap();


    public static WorkDataHolder get() {
        return get(null);
    }

    public static WorkDataHolder get(Long divisionId) {
        if (divisionId==null){
            divisionId= XcmgAmConstants.DIVISION_WH101_ID;
        }
        WorkDataHolder woker=workers.get(divisionId);
        if (woker==null){
            woker=new WorkDataHolder();
            workers.put(divisionId, woker);
        }
        return woker;
    }
}
